// src/store/index.js
import { createStore } from 'vuex'

export default createStore({
    //状态，全局变量
  state: {
    count: 10,
    nick:'鲁迅'
  },
  mutations:{
    addCount1(state){
      console.log('i am addCount1');
      //统一校验
      state.count += 1;
    },
    addCount6(state,num){
      console.log('i am addCount6',num);
      //统一校验
      state.count += num;
    }
  }
})